package com.py.admin.service.impl;

import com.py.admin.service.AdArticleVerifyService;
import com.py.apis.wemedia.IWmNewsClient;
import com.py.model.admin.dtos.NewsAuthDto;
import com.py.model.common.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName AdArticleVerifyServiceImpl
 * @Description TODO
 * @Author AXing
 * @Date 2022/11/17 17:02
 * @Version 1.0
 */
@Service
@Slf4j
public class AdArticleVerifyServiceImpl implements AdArticleVerifyService {

    @Autowired
    private IWmNewsClient wmNewsClient;
    /**
     * 内容审核列表
     * @param dto
     * @return
     */
    @Override
    public ResponseResult list(NewsAuthDto dto) {
        return wmNewsClient.listWmnews(dto);
    }

    /**
     * 查看文章详情
     * @param id
     * @return
     */
    @Override
    public ResponseResult getDetail(Integer id) {
        return wmNewsClient.getDetail(id);
    }

    /**
     * 文章审核驳回
     * @param dto
     * @return
     */
    @Override
    public ResponseResult refusePass(NewsAuthDto dto) {
        return wmNewsClient.refusePass(dto);
    }

    /**
     * 文章人工审核通过
     * @param dto
     * @return
     */
    @Override
    public ResponseResult pass(NewsAuthDto dto) {
        return wmNewsClient.pass(dto);
    }
}
